import type AliOssSdk from "ali-oss";
import type { Options as AliOssOptions } from "ali-oss";

export type FileAcl = "private" | "public-read" | "public-read-write";

export interface StsTokenResponse {
  accessKeyId: string;
  accessKeySecret: string;
  securityToken: string;
}

export interface OssAuth extends AliOssOptions {
  stsToken: string;
  refreshSTSToken: () => Promise<OssAuth>;
  refreshSTSTokenInterval: number;
}

export interface OssStoreState {
  clientOssObj: AliOssSdk | null;
  clientOss: OssAuth | null;
}
